/**
 * 
 */
package com.fgbf.todo.MainClasses;

/**
 * A class that represents a Task in the Todo list 
 * @author BPB
 * @date 3/11/2012
 */
public class Task {
	
	
	/////////////////////////////////////////////////////////////////////////////
	// INSTANCE DATA
	/////////////////////////////////////////////////////////////////////////////
	
	/**
	 * String data for the Task class
	 */
	private String name, note, addrStreet, addrCity, addrState, addrZip;
	
	/**
	 * The category of the Task
	 */
	private Category category;
	
	/**
	 * The priority of the task
	 */
	private int priority = 0;
	
	/**
	 * The due date of the task in milliseconds after January 1, 1970 00:00:00 UTC.
	 */
	private long dueDate;
	
	/**
	 * Boolean value representing whether or not the task was completed
	 */
	private boolean taskComplete;
	
	
	/////////////////////////////////////////////////////////////////////////////
	// CONSTRUCTORS
	/////////////////////////////////////////////////////////////////////////////
	
	/**
	 * Constructor, only takes in the given task name as a parameter
	 * @param name The desired task name
	 */
	public Task(String name) {
		this.name = name;
	}
	//---------------------------------------------------------------------------
	
	/**
	 * Constructor, takes in name, note, category, and priority as parameters
	 * @param name The desired name for the task
	 * @param note A short note regarding the task
	 */
	public Task (String name, String note) {
		this.name = name;
		this.note = note;
	}
	//---------------------------------------------------------------------------

	/**
	 * Constructor, takes in name, note, and priority as parameters
	 * @param name The desired name for the task
	 * @param note A short note regarding the task
	 * @param pri The priority of the task
	 */
	public Task(String name, String note, int pri) {
		this.name = name;
		this.note = note;
		this.priority = pri;
		
	}
	//---------------------------------------------------------------------------
	
	/**
	 * Constructor, takes in name, note, category, and priority as parameters
	 * @param name The desired name for the task
	 * @param note A short note regarding the task
	 * @param cat The category of task
	 * @param pri The priority of the task
	 */
	public Task(String name, String note, Category cat, int pri) {
		this.name = name;
		this.note = note;
		this.category = cat;
		this.priority = pri;
		
	}
	//---------------------------------------------------------------------------
	
	/**
	 * Constructor, takes in name, note, category, and priority as parameters
	 * @param name The desired name for the task
	 * @param note A short note regarding the task
	 * @param cat The category of task
	 * @param pri The priority of the task
	 * @param dueDate The Due Date of the task
	 */
	public Task(String name, String note, Category cat, int pri, long dueDate) {
		this.name = name;
		this.note = note;
		this.category = cat;
		this.priority = pri;
		this.dueDate = dueDate;
		
	}
	//---------------------------------------------------------------------------
	
	/**
	 * Constructor, takes in name, note, category, and priority as parameters
	 * @param name The desired name for the task
	 * @param note A short note regarding the task
	 * @param cat The category of task
	 * @param pri The priority of the task
	 * @param dueDate The Due Date of the task
	 * @param taskComplete True if task is completed, false otherwise
	 */
	public Task(String name, String note, Category cat, int pri, long dueDate, boolean taskComplete) {
		this.name = name;
		this.note = note;
		this.category = cat;
		this.priority = pri;
		this.dueDate = dueDate;
		this.taskComplete = taskComplete;
		
	}
	//---------------------------------------------------------------------------
	
	/**
	 * Constructor, takes in name, note, category, and priority as parameters
	 * @param name The desired name for the task
	 * @param note A short note regarding the task
	 * @param cat The category of task
	 * @param pri The priority of the task
	 * @param dueDate The Due Date of the task
	 */
	public Task(String name, String note, Category cat, int pri, long dueDate,
			String addrStreet, String addrCity, String addrState, String addrZip) {
		this.name = name;
		this.note = note;
		this.category = cat;
		this.priority = pri;
		this.dueDate = dueDate;
		this.addrStreet = addrStreet;
		this.addrCity = addrCity;
		this.addrState = addrState;
		this.addrZip = addrZip;
		
	}
	//---------------------------------------------------------------------------
	
	/**
	 * Constructor, takes in name, note, category, and priority as parameters
	 * @param name The desired name for the task
	 * @param note A short note regarding the task
	 * @param cat The category of task
	 * @param pri The priority of the task
	 * @param dueDate The Due Date of the task
	 * @param taskComplete True if task is completed, false otherwise
	 */
	public Task(String name, String note, Category cat, int pri, long dueDate, 
			boolean taskComplete, String addrStreet, String addrCity, String addrState, 
			String addrZip) {
		this.name = name;
		this.note = note;
		this.category = cat;
		this.priority = pri;
		this.dueDate = dueDate;
		this.taskComplete = taskComplete;
		this.addrStreet = addrStreet;
		this.addrCity = addrCity;
		this.addrState = addrState;
		this.addrZip = addrZip;
		
	}
	//---------------------------------------------------------------------------

	
	/////////////////////////////////////////////////////////////////////////////
	// ACCESSORS AND MUTATORS
	/////////////////////////////////////////////////////////////////////////////
	
	/**
	 * Returns the value of taskComplete
	 */
	public boolean isCompleted() {
		return taskComplete;
	}
	//---------------------------------------------------------------------------

	/**
	 * Returns the name of the task
	 * @return The name of the task
	 */
	public String getName() {
		return name;
	}
	//---------------------------------------------------------------------------

	/**
	 * Returns the note given for the task
	 * @return The note for the task
	 */
	public String getNote() {
		return note;
	}
	//---------------------------------------------------------------------------

	/**
	 * Sets a new note for the task
	 * @param note The desired note for the task
	 */
	public void setNote(String note) {
		this.note = note;
	}
	//---------------------------------------------------------------------------

	/**
	 * Returns the Category for the task
	 * @return The Category for the task
	 */
	public String getCategory() {
		return category.getCurrentCategory();
	}
	//---------------------------------------------------------------------------

	/**
	 * Sets the category for the task
	 * @param category The desired category for the task
	 */
	public void setCategory(Category category) {
		this.category = category;
	}
	//---------------------------------------------------------------------------

	/**
	 * Returns the priority of the task
	 * @return the priority of the task
	 */
	public int getPriority() {
		return priority;
	}
	//---------------------------------------------------------------------------

	/**
	 * Sets the priority for the task
	 * @param priority The desired priority for the task
	 */
	public void setPriority(int priority) {
		this.priority = priority;
	}
	//---------------------------------------------------------------------------

	/**
	 * Sets the name of the task
	 * @param name The desired name for the task
	 */
	public void setName(String name) {
		this.name = name;
	}
	//---------------------------------------------------------------------------
	
	/**
	 * Returns the duedate of the task
	 */
	public long getDueDate() {
		return dueDate;
	}

	public String getAddrStreet() {
		return addrStreet;
	}

	public void setAddrStreet(String addrStreet) {
		this.addrStreet = addrStreet;
	}

	public String getAddrCity() {
		return addrCity;
	}

	public void setAddrCity(String addrCity) {
		this.addrCity = addrCity;
	}

	public String getAddrState() {
		return addrState;
	}

	public void setAddrState(String addrState) {
		this.addrState = addrState;
	}

	public String getAddrZip() {
		return addrZip;
	}

	public void setAddrZip(String addrZip) {
		this.addrZip = addrZip;
	}



	
	

}
